-- ======================================================================
-- Hell Logic Sniffer Addon 
-- 
-- Copyright 2013 Hell-Prototypes
--
-- http://www.hellprototypes.com/
-- ======================================================================

ModuleClass = "LS_DECODER"
ModuleName  = "CUSTOM"
ModuleAlias = "Custom Decoder example"
ModuleTip   = "This is Custom Decoder example's Tip Text"
ModuleParam1= "I'm param1"
ModuleParam2= "I'm param2"
ModuleParam3= "I'm param3"
ModuleParam4= "I'm param4"
ModuleParam5= "I'm param5"
ModuleParam6= "I'm param6"

function main ()
	LS_API.DebugMsg("===CUSTOM_Decode.lua main function called===")
    -- param check
    if type(LS_PARAM) ~= "table" then
    	LS_API.MessageBox("<CUSTOM> LS_PARAM was not a table class")
		return
    end
    if #LS_PARAM ~= 6 then
    	LS_API.MessageBox("<CUSTOM> LS_PARAM's size must = 6, size = " .. #LS_PARAM)
    end
    
    local msg = "This is Custom decoder popup message.\r\nAdd your custom code to do what you need to do ...\r\n"
    
    msg = msg .. "Custom param:\r\n[1]: " .. LS_PARAM[1] .. "\r\n"
    msg = msg .. "[2]: " .. LS_PARAM[2] .. "\r\n"
    msg = msg .. "[3]: " .. LS_PARAM[3] .. "\r\n"
    msg = msg .. "[4]: " .. LS_PARAM[4] .. "\r\n"
    msg = msg .. "[5]: " .. LS_PARAM[5] .. "\r\n"
    msg = msg .. "[6]: " .. LS_PARAM[6] 
    
    LS_API.MessageBox(msg)
end